package com.crr.controller;

import com.crr.bean.ResultBean;
import com.crr.bean.UserAddr;
import com.crr.service.UserAddrService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "用户收货地址")
@RequestMapping("/api/addr")
public class UserAddrController extends BaseController{
    @Autowired
    UserAddrService userAddrService;
    @PostMapping("/save")
    @ApiOperation("新增用户地址")
    public ResultBean save(UserAddr userAddr){
        int i = userAddrService.saveEntity(userAddr);
        return saveResult(i);
    }

}
